package com.yu.waterstation.app.moudles.worker.service;

import com.yu.waterstation.common.entity.app.form.UpdatePasswordByWeiXinForm;
import com.yu.waterstation.common.entity.app.form.UpdatePasswordForm;
import com.yu.waterstation.common.entity.app.form.WeixinLoginForm;
import com.yu.waterstation.common.entity.app.dto.WorkerDTO;
import com.yu.waterstation.common.entity.app.form.UpdateWorkerForm;
import com.yu.waterstation.common.entity.app.form.WorkerLoginForm;
import com.yu.waterstation.common.common.exception.ServiceException;
import com.yu.waterstation.common.common.util.result.Result;


public interface WorkerService {

    // 通过编号和密码登录
    Result<WorkerDTO> login(WorkerLoginForm loginVo) throws Exception;

    // 通过微信小程序获取的code在服务器获取微信openid登录
    Result<WorkerDTO>  loginByWx(WeixinLoginForm weixinLoginForm)  ;

    // 获取送水员详情信息
    WorkerDTO getWorkerInfo(Integer studentId) ;

    // 绑定微信
    String bindWeiXin(Integer workerId, WeixinLoginForm form) throws ServiceException;

    // 修改密码
    int updatePassword(Integer workerId, UpdatePasswordForm updatePasswordForm) throws Exception;

    // 微信授权修改密码
    int updatePasswordByWeiXin(Integer workerId, UpdatePasswordByWeiXinForm vo) throws Exception;


    // 更新信息
    WorkerDTO updateWorkerInfo(Integer workerId, UpdateWorkerForm vo) throws Exception;

}
